// 用户模块

const state = () => {
  return {
    // 用户信息
    profile: {
      id: '',
      nickname: '',
      account: '',
      mobile: '',
      token: '',
      avatar:''
    }
  }
}

const mutations = {
  // 修改用户信息
  setUser (state, payload) {
    state.profile = payload
  },
  // 修改用户头像
  setUserAvatar(state, avatar){
    state.profile.avatar = avatar
  }
}

const actions = {

}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
